package com.cloudz.iptv.bing;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.cloudz.iptv.R;
import com.cloudz.iptv.activity.BaseActivity;
import com.cloudz.iptv.fragment.BaseFragment;
import com.cloudz.iptv.utils.cache.ACache;
import com.cloudz.iptv.utils.cache.ACacheConstants;
import com.owen.widget.RoundFrameLayout;

import butterknife.BindView;

public class BingActivity extends BaseActivity implements BaseFragment.FocusBorderHelper
{

    @BindView(R.id.bing_btn_fwsz)
    RoundFrameLayout fwsz;

    @BindView(R.id.bing_btn_qchc)
    RoundFrameLayout qchc;

    private ACache aCache;

    @Override
    public int getLayoutId()
    {
        return R.layout.activity_bing;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {

        super.onCreate(savedInstanceState);

        aCache = ACache.get(this);

        // 设置按钮监听
        fwsz.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                Intent intent = new Intent(BingActivity.this, BingAddrActivity.class);
                startActivity(intent);
            }
        });

        qchc.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                aCache.remove(ACacheConstants.CHANNEL_CACHE);
                showToast(" 清除缓存成功");
            }
        });
    }

}
